import { getFldm } from '@/utils/get-fldm'
export const formItem = async (key: string) => {
  const obj: any = {
    gdyjCqyj: [
      {
        disabled: false,
        label: '承办单位',
        prop: 'cbdwList',
        type: 'treeSelectAll',
        showAll: true,
        placeholder: '请输入承办单位',
        multiple: true,
        options: [],
        required: false,
        clearable: false,
        isLeafNode: false,
        checkStrictly: true,
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmList',
        multiple: true,
        clearable: false,
        showAll: true,
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        options: [],
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'jcg',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        placeholder: '请输入部门受案号',
        type: 'input',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        placeholder: '请输入统一受案号',
        type: 'input',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '问题发现时间',
        prop: 'fx-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '监督方式',
        prop: 'jdfsdm',
        placeholder: '请选择监督方式',
        type: 'select',
        options: await getFldm('gd064'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '监督状态',
        prop: 'jdztdm',
        placeholder: '请选择监督状态',
        type: 'select',
        options: await getFldm('gd065'),
        iswm: 'Y',
      },
    ],
  }
  return obj[key]
}
